package com.eastfair.venuebooking.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.eastfair.database.mybatis.typehandler.M9EncryptHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.venuebooking.enumeration.VenueBookAuditAuditStatusEnum;
import com.eastfair.venuebooking.enumeration.VenueBookAuditVenueBookSourceEnum;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 场馆预定审核表
 * </p>
 *
 * @author dqq
 * @since 2023-03-29
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value = "vb_venue_book_audit", autoResultMap = true)
@ApiModel(value = "VenueBookAudit", description = "场馆预定审核表")
@AllArgsConstructor
public class VenueBookAudit extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用：1是；0否")
    private Integer isEnabled;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 外部展会唯一标识
     */
    @ApiModelProperty(value = "外部展会唯一标识")
    @Size(max = 64, message = "外部展会唯一标识长度不能超过64")
    @TableField(value = "external_exhibition_code", condition = LIKE)
    @Excel(name = "外部展会唯一标识")
    private String externalExhibitionCode;

    /**
     * 展会编号
     */
    @ApiModelProperty(value = "展会编号")
    @Size(max = 64, message = "展会编号长度不能超过64")
    @TableField(value = "exhibition_no", condition = LIKE)
    @Excel(name = "展会编号")
    private String exhibitionNo;

    /**
     * 展会名称
     */
    @ApiModelProperty(value = "展会名称")
    @Size(max = 200, message = "展会名称长度不能超过200")
    @TableField(value = "exhibition_name", condition = LIKE)
    @Excel(name = "展会名称")
    private String exhibitionName;

    /**
     * 展会简称
     */
    @ApiModelProperty(value = "展会简称")
    @Size(max = 200, message = "展会简称长度不能超过200")
    @TableField(value = "exhibition_short_name", condition = LIKE)
    @Excel(name = "展会简称")
    private String exhibitionShortName;

    /**
     * 展会类型 (EXHIBITION:展会;MEETING:会议;FORUM:论坛;OTHER:其他)
     */
    @ApiModelProperty(value = "展会类型 (EXHIBITION:展会;MEETING:会议;FORUM:论坛;OTHER:其他)")
    @Size(max = 64, message = "展会类型 (EXHIBITION:展会;MEETING:会议;FORUM:论坛;OTHER:其他)长度不能超过64")
    @TableField(value = "exhibition_type", condition = LIKE)
    @Excel(name = "展会类型 (EXHIBITION:展会;MEETING:会议;FORUM:论坛;OTHER:其他)")
    private String exhibitionType;

    /**
     * 展会英文名称
     */
    @ApiModelProperty(value = "展会英文名称")
    @Size(max = 200, message = "展会英文名称长度不能超过200")
    @TableField(value = "exhibition_en_name", condition = LIKE)
    @Excel(name = "展会英文名称")
    private String exhibitionEnName;

    /**
     * 展会介绍
     */
    @ApiModelProperty(value = "展会介绍")
    @Size(max = 255, message = "展会介绍长度不能超过255")
    @TableField(value = "remark", condition = LIKE)
    @Excel(name = "展会介绍")
    private String remark;

    /**
     * 所属行业 INDUSTRY_ONE:农林渔牧;INDUSTRY_TWO:工业智造;INDUSTRY_THREE:新兴产业;INDUSTRY_FOUR:美好生活;OTHER:其他
     */
    @ApiModelProperty(value = "所属行业 INDUSTRY_ONE:农林渔牧;INDUSTRY_TWO:工业智造;INDUSTRY_THREE:新兴产业;INDUSTRY_FOUR:美好生活;OTHER:其他")
    @Size(max = 64, message = "所属行业 INDUSTRY_ONE:农林渔牧;INDUSTRY_TWO:工业智造;INDUSTRY_THREE:新兴产业;INDUSTRY_FOUR:美好生活;OTHER:其他长度不能超过64")
    @TableField(value = "industry", condition = LIKE)
    @Excel(name = "所属行业 INDUSTRY_ONE:农林渔牧;INDUSTRY_TWO:工业智造;INDUSTRY_THREE:新兴产业;INDUSTRY_FOUR:美好生活;OTHER:其他")
    private String industry;

    /**
     * 承办单位
     */
    @ApiModelProperty(value = "承办单位")
    @Size(max = 300, message = "承办单位长度不能超过300")
    @TableField(value = "undertaker_name", condition = LIKE)
    @Excel(name = "承办单位")
    private String undertakerName;

    /**
     * 展会logo
     */
    @ApiModelProperty(value = "展会logo")
    @Size(max = 200, message = "展会logo长度不能超过200")
    @TableField(value = "logo_url", condition = LIKE)
    @Excel(name = "展会logo")
    private String logoUrl;

    /**
     * 客户名称
     */
    @ApiModelProperty(value = "客户名称")
    @Size(max = 200, message = "客户名称长度不能超过200")
    @TableField(value = "customer_cn_name", condition = LIKE)
    @Excel(name = "客户名称")
    private String customerCnName;

    /**
     * 统一社会信用代码
     */
    @ApiModelProperty(value = "统一社会信用代码")
    @Size(max = 64, message = "统一社会信用代码长度不能超过64")
    @TableField(value = "uscc", condition = LIKE)
    @Excel(name = "统一社会信用代码")
    private String uscc;

    /**
     * 联系人姓名
     */
    @ApiModelProperty(value = "联系人姓名")
    @Size(max = 200, message = "联系人姓名长度不能超过200")
    @TableField(value = "contact_name", condition = LIKE)
    @Excel(name = "联系人姓名")
    private String contactName;

    /**
     * 联系人角色
     */
    @ApiModelProperty(value = "联系人角色")
    @Size(max = 64, message = "联系人角色长度不能超过64")
    @TableField(value = "contact_role", condition = LIKE)
    @Excel(name = "联系人角色")
    private String contactRole;

    /**
     * 联系人联系方式
     */
    @ApiModelProperty(value = "联系人联系方式")
    @Size(max = 20, message = "联系人联系方式长度不能超过20")
    @TableField(value = "mobile", condition = LIKE, typeHandler = M9EncryptHandler.class)
    @Excel(name = "联系人联系方式")
    private String mobile;

    /**
     * 展览开始时间
     */
    @ApiModelProperty(value = "展览开始时间")
    @TableField(value = "exhibition_start_time")
    @Excel(name = "展览开始时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime exhibitionStartTime;

    /**
     * 展览结束时间
     */
    @ApiModelProperty(value = "展览结束时间")
    @TableField(value = "exhibition_end_time")
    @Excel(name = "展览结束时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime exhibitionEndTime;

    /**
     * 布展开始时间
     */
    @ApiModelProperty(value = "布展开始时间")
    @TableField(value = "arrangement_start_time")
    @Excel(name = "布展开始时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime arrangementStartTime;

    /**
     * 布展结束时间
     */
    @ApiModelProperty(value = "布展结束时间")
    @TableField(value = "arrangement_end_time")
    @Excel(name = "布展结束时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime arrangementEndTime;

    /**
     * 撤展开始时间
     */
    @ApiModelProperty(value = "撤展开始时间")
    @TableField(value = "dismantling_start_time")
    @Excel(name = "撤展开始时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime dismantlingStartTime;

    /**
     * 撤展结束时间
     */
    @ApiModelProperty(value = "撤展结束时间")
    @TableField(value = "dismantling_end_time")
    @Excel(name = "撤展结束时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime dismantlingEndTime;

    /**
     * 主办
     */
    @ApiModelProperty(value = "主办")
    @Size(max = 200, message = "主办长度不能超过200")
    @TableField(value = "sponsor_name", condition = LIKE)
    @Excel(name = "主办")
    private String sponsorName;

    /**
     * 展会网址
     */
    @ApiModelProperty(value = "展会网址")
    @Size(max = 200, message = "展会网址长度不能超过200")
    @TableField(value = "exhibition_website", condition = LIKE)
    @Excel(name = "展会网址")
    private String exhibitionWebsite;

    /**
     * 预定场地: 场地名称,分割
     */
    @ApiModelProperty(value = "预定场地: 场地名称,分割")
    @Size(max = 500, message = "预定场地: 场地名称,分割长度不能超过500")
    @TableField(value = "book_venue", condition = LIKE)
    @Excel(name = "预定场地: 场地名称,分割")
    private String bookVenue;

    /**
     * 申请时间
     */
    @ApiModelProperty(value = "申请时间")
    @TableField(value = "submit_time")
    @Excel(name = "申请时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime submitTime;

    /**
     * 审核状态 #{SUBMIT:待审核;APPROVED:审核通过;NOT_APPROVED:审核未通过}
     */
    @ApiModelProperty(value = "审核状态 #{SUBMIT:待审核;APPROVED:审核通过;NOT_APPROVED:审核未通过}")
    @TableField(value = "audit_status")
    @Excel(name = "审核状态 #{SUBMIT:待审核;APPROVED:审核通过;NOT_APPROVED:审核未通过}", replace = {"待审核_SUBMIT", "审核通过_APPROVED", "审核未通过_NOT_APPROVED",  "_null"})
    private VenueBookAuditAuditStatusEnum auditStatus;

    /**
     * 审核结果
     */
    @ApiModelProperty(value = "审核结果")
    @Size(max = 200, message = "审核结果长度不能超过200")
    @TableField(value = "audit_result", condition = LIKE)
    @Excel(name = "审核结果")
    private String auditResult;

    /**
     * 审核意见
     */
    @ApiModelProperty(value = "审核意见")
    @Size(max = 200, message = "审核意见长度不能超过200")
    @TableField(value = "audit_opinion", condition = LIKE)
    @Excel(name = "审核意见")
    private String auditOpinion;

    /**
     * 审核时间
     */
    @ApiModelProperty(value = "审核时间")
    @TableField(value = "audit_time")
    @Excel(name = "审核时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime auditTime;

    /**
     * 审核人ID
     */
    @ApiModelProperty(value = "审核人ID")
    @TableField(value = "audit_user_id")
    @Excel(name = "审核人ID")
    private Long auditUserId;

    /**
     * 审核人姓名
     */
    @ApiModelProperty(value = "审核人姓名")
    @Size(max = 64, message = "审核人姓名长度不能超过64")
    @TableField(value = "audit_user_name", condition = LIKE)
    @Excel(name = "审核人姓名")
    private String auditUserName;

    /**
     * 场馆预定申请来源 #{CONFERENCE:展览会议系统;VENUE_WEBSITE:场馆官网}
     */
    @ApiModelProperty(value = "场馆预定申请来源 #{CONFERENCE:展览会议系统;VENUE_WEBSITE:场馆官网}")
    @TableField(value = "venue_book_source")
    @Excel(name = "场馆预定申请来源 #{CONFERENCE:展览会议系统;VENUE_WEBSITE:场馆官网}", replace = {"展览会议系统_CONFERENCE", "场馆官网_VENUE_WEBSITE",  "_null"})
    private VenueBookAuditVenueBookSourceEnum venueBookSource;


    @Builder
    public VenueBookAudit(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Integer isEnabled, Long projectId, Long subsystemId, Long tenantId, Integer isDeleted, 
                    String externalExhibitionCode, String exhibitionNo, String exhibitionName, String exhibitionShortName, String exhibitionType, String exhibitionEnName, 
                    String remark, String industry, String undertakerName, String logoUrl, String customerCnName, String uscc, 
                    String contactName, String contactRole, String mobile, LocalDateTime exhibitionStartTime, LocalDateTime exhibitionEndTime, LocalDateTime arrangementStartTime, 
                    LocalDateTime arrangementEndTime, LocalDateTime dismantlingStartTime, LocalDateTime dismantlingEndTime, String sponsorName, String exhibitionWebsite, String bookVenue, 
                    LocalDateTime submitTime, VenueBookAuditAuditStatusEnum auditStatus, String auditResult, String auditOpinion, LocalDateTime auditTime, Long auditUserId, 
                    String auditUserName, VenueBookAuditVenueBookSourceEnum venueBookSource) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.isDeleted = isDeleted;
        this.externalExhibitionCode = externalExhibitionCode;
        this.exhibitionNo = exhibitionNo;
        this.exhibitionName = exhibitionName;
        this.exhibitionShortName = exhibitionShortName;
        this.exhibitionType = exhibitionType;
        this.exhibitionEnName = exhibitionEnName;
        this.remark = remark;
        this.industry = industry;
        this.undertakerName = undertakerName;
        this.logoUrl = logoUrl;
        this.customerCnName = customerCnName;
        this.uscc = uscc;
        this.contactName = contactName;
        this.contactRole = contactRole;
        this.mobile = mobile;
        this.exhibitionStartTime = exhibitionStartTime;
        this.exhibitionEndTime = exhibitionEndTime;
        this.arrangementStartTime = arrangementStartTime;
        this.arrangementEndTime = arrangementEndTime;
        this.dismantlingStartTime = dismantlingStartTime;
        this.dismantlingEndTime = dismantlingEndTime;
        this.sponsorName = sponsorName;
        this.exhibitionWebsite = exhibitionWebsite;
        this.bookVenue = bookVenue;
        this.submitTime = submitTime;
        this.auditStatus = auditStatus;
        this.auditResult = auditResult;
        this.auditOpinion = auditOpinion;
        this.auditTime = auditTime;
        this.auditUserId = auditUserId;
        this.auditUserName = auditUserName;
        this.venueBookSource = venueBookSource;
    }

}
